package com.bw.park.ui.splash

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.mooc.lib_common.action.BusAction
import com.mooc.lib_common.action.BusConst
import com.mooc.lib_common.bus.LiveDataBus
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch

class SplashViewModel : ViewModel(){

    val startPagerData = LiveDataBus<BusAction>()

    fun startTimmer(){

        viewModelScope.launch {
            delay(3000)
            startPagerData.postValue(BusAction(BusConst.LOGINACTION,null))
        }

    }

}